//
//  TjVC.swift
//  Auscultation
//
//  Created by 来 on 2020/11/28.
//

import UIKit

class TjVC: BaseVC {

    var scrollView: UIScrollView!
    
    var mxys: UILabel!
    var shzb: UILabel!
    var bzzb: UILabel!
    
    var diyi_i: UIImageView!
    var dier_i: UIImageView!
    var disan_i: UIImageView!
    var diyi_l: UILabel!
    var dier_l: UILabel!
    var disan_l: UILabel!
    
    var tjjz: UILabel!
    
    // 样本总数
    var ybzs1: ybzsV1!
    var ybzs2: ybzsV1!
    var ybzs3: ybzsV1!
    var ybzs4: ybzsV1!
    var ybzs5: ybzsV1!
    var ybzs6: ybzsV1!
    
    // 中国地图
    var china_map: ChinaV!
    
    // 年月日
    var nyr: LGFSwiftPT!
    var yb_l: UILabel!
    var yxyb_l: UILabel!
    var ybzzcs_chart: LineChartView!
    var yy1_v: UIView!
    var yy1: UILabel!
    var yy2_v: UIView!
    var yy2: UILabel!
    var yy3_v: UIView!
    var yy3: UILabel!
    var yy_color: [String] = ["00C9F4", "0F88F2", "F79E1C"]
    
    // 位置
    var dw: UILabel!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        initUI()
        initData()
    }
    
    func initData() {
        china_map.setData(["内蒙古:DDDDDD:200", "湖北:6495ED:30000", "浙江:F538F6:13445"])
        let list1 = [["num": 11], ["num": 100], ["num": 20], ["num": 200], ["num": 400], ["num": 111], ["num": 240]]
        let list2 = [["num": 111], ["num": 10], ["num": 500], ["num": 20], ["num": 40], ["num": 151], ["num": 40]]
        let list3 = [["num": 50], ["num": 60], ["num": 120], ["num": 400], ["num": 70], ["num": 210], ["num": 330]]
        let xValues = ["2014", "2015", "2016", "2017", "2018", "2019", "2020"]
        setLineData(list1, list2, list3, xValues, ybzzcs_chart)
        yy1_v.backgroundColor = UIColor.init(lgf_HexString: yy_color[0])
        yy2_v.backgroundColor = UIColor.init(lgf_HexString: yy_color[1])
        yy3_v.backgroundColor = UIColor.init(lgf_HexString: yy_color[2])
        yy1.text = "医院1"
        yy2.text = "医院2"
        yy3.text = "医院3"
    }

    // 样本
    @objc func s_yb(_ sender: UITapGestureRecognizer) {
        yb_l.backgroundColor = UIColor.init(lgf_HexString: "0F88F2")
        yxyb_l.backgroundColor = UIColor.init(lgf_HexString: "E0E6EB")
    }
    
    // 有效样本
    @objc func s_yxyb(_ sender: UITapGestureRecognizer) {
        yxyb_l.backgroundColor = UIColor.init(lgf_HexString: "0F88F2")
        yb_l.backgroundColor = UIColor.init(lgf_HexString: "E0E6EB")
    }
    
    @objc func s_mxys(_ sender: UITapGestureRecognizer) {
        o_mxys()
    }
    
    @objc func s_shzb(_ sender: UITapGestureRecognizer) {
        o_shzb()
    }
    
    @objc func s_bzzb(_ sender: UITapGestureRecognizer) {
        o_bzzb()
    }
    
}
